extends Card

var my_dmg = 4

func _init():
	my_cost = 1
	print("attack Card init")

func activate_card_effect(target_coord):
	if abs(Chessboard.focus_player.my_coord[0] - target_coord[0]) + abs(Chessboard.focus_player.my_coord[1] - target_coord[1]) != 1:
		print("target coord too far")
		Messager.add_message("距离太远")
		return false
	else:
		var x = target_coord[0]
		var y = target_coord[1]
		if Chessboard.board_array[x][y] != null:
			Chessboard.board_array[x][y].receive_dmg(my_dmg)
		return true
